package zdream.pmfield.data.foe;

import static zdream.pmfield.data.foe.VStat.*;

/**
 * Stat for Basic
 */
public enum BStat {
	HP(VITALITY, FLEXIBILITY),
	AT(STRENGTH, AWARENESS),
	DF(AWARENESS, INTELLIGENCE),
	SA(INTELLIGENCE, TALENT),
	SD(TALENT, STRENGTH),
	SP(FLEXIBILITY, VITALITY);

	BStat(VStat majorEffect, VStat minorEffect) {
		this.majorEffect = majorEffect;
		this.minorEffect = minorEffect;
	}

	/**
	 * 主要影响因子和次要影响因子.
	 *
	 * 每个属性点计算时, majorEffect 或 minorEffect 对应的 VStat 越高, BStat 点数越大;
	 * majorEffect 的影响大, minorEffect 的影响小.
	 */
	public final VStat majorEffect, minorEffect;

	/**
	 * 计算护盾值影响系数
	 */
	public static final float[] SHIELD_FACTORS = new float[6];

	static {
		SHIELD_FACTORS[HP.ordinal()] = 0.012f;
		SHIELD_FACTORS[AT.ordinal()] = 0.001f;
		SHIELD_FACTORS[DF.ordinal()] = 0.007f;
		SHIELD_FACTORS[SA.ordinal()] = 0.001f;
		SHIELD_FACTORS[SD.ordinal()] = 0.008f;
		SHIELD_FACTORS[SP.ordinal()] = 0.005f;
	}
}
